<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-2"></span><span>
</span><span id="line-3"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-4"></span><span class="hs-comment">--</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- Stg to C-- code generation: the binding environment</span><span>
</span><span id="line-6"></span><span class="hs-comment">--</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- (c) The University of Glasgow 2004-2006</span><span>
</span><span id="line-8"></span><span class="hs-comment">--</span><span>
</span><span id="line-9"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-10"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.StgToCmm.Env</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-11"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#CgIdInfo"><span class="hs-identifier">CgIdInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-12"></span><span>
</span><span id="line-13"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Env.html#litIdInfo"><span class="hs-identifier">litIdInfo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Env.html#lneIdInfo"><span class="hs-identifier">lneIdInfo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Env.html#rhsIdInfo"><span class="hs-identifier">rhsIdInfo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Env.html#mkRhsInit"><span class="hs-identifier">mkRhsInit</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-14"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Env.html#idInfoToAmode"><span class="hs-identifier">idInfoToAmode</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-15"></span><span>
</span><span id="line-16"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Env.html#addBindC"><span class="hs-identifier">addBindC</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Env.html#addBindsC"><span class="hs-identifier">addBindsC</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-17"></span><span>
</span><span id="line-18"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Env.html#bindArgsToRegs"><span class="hs-identifier">bindArgsToRegs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Env.html#bindToReg"><span class="hs-identifier">bindToReg</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Env.html#rebindToReg"><span class="hs-identifier">rebindToReg</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-19"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Env.html#bindArgToReg"><span class="hs-identifier">bindArgToReg</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Env.html#idToReg"><span class="hs-identifier">idToReg</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-20"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Env.html#getArgAmode"><span class="hs-identifier">getArgAmode</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Env.html#getNonVoidArgAmodes"><span class="hs-identifier">getNonVoidArgAmodes</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-21"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Env.html#getCgIdInfo"><span class="hs-identifier">getCgIdInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-22"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Env.html#maybeLetNoEscape"><span class="hs-identifier">maybeLetNoEscape</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-23"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span class="hs-cpp">

#include &quot;HsVersions.h&quot;
</span><span>
</span><span id="line-27"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-28"></span><span>
</span><span id="line-29"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html"><span class="hs-identifier">GHC.Core.TyCon</span></a></span><span>
</span><span id="line-30"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#"><span class="hs-identifier">GHC.Platform</span></a></span><span>
</span><span id="line-31"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html"><span class="hs-identifier">GHC.StgToCmm.Monad</span></a></span><span>
</span><span id="line-32"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Utils.html"><span class="hs-identifier">GHC.StgToCmm.Utils</span></a></span><span>
</span><span id="line-33"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html"><span class="hs-identifier">GHC.StgToCmm.Closure</span></a></span><span>
</span><span id="line-34"></span><span>
</span><span id="line-35"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.CLabel.html"><span class="hs-identifier">GHC.Cmm.CLabel</span></a></span><span>
</span><span id="line-36"></span><span>
</span><span id="line-37"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.BlockId.html"><span class="hs-identifier">GHC.Cmm.BlockId</span></a></span><span>
</span><span id="line-38"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html"><span class="hs-identifier">GHC.Cmm.Expr</span></a></span><span>
</span><span id="line-39"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Utils.html"><span class="hs-identifier">GHC.Cmm.Utils</span></a></span><span>
</span><span id="line-40"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html"><span class="hs-identifier">GHC.Driver.Session</span></a></span><span>
</span><span id="line-41"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Id.html"><span class="hs-identifier">GHC.Types.Id</span></a></span><span>
</span><span id="line-42"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Graph.html"><span class="hs-identifier">GHC.Cmm.Graph</span></a></span><span>
</span><span id="line-43"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.html"><span class="hs-identifier">GHC.Types.Name</span></a></span><span>
</span><span id="line-44"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-45"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Stg.Syntax.html"><span class="hs-identifier">GHC.Stg.Syntax</span></a></span><span>
</span><span id="line-46"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Type.html"><span class="hs-identifier">GHC.Core.Type</span></a></span><span>
</span><span id="line-47"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Builtin.Types.Prim.html"><span class="hs-identifier">GHC.Builtin.Types.Prim</span></a></span><span>
</span><span id="line-48"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.FM.html"><span class="hs-identifier">GHC.Types.Unique.FM</span></a></span><span>
</span><span id="line-49"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html"><span class="hs-identifier">GHC.Utils.Misc</span></a></span><span>
</span><span id="line-50"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html"><span class="hs-identifier">GHC.Types.Var.Env</span></a></span><span>
</span><span id="line-51"></span><span>
</span><span id="line-52"></span><span class="hs-comment">-------------------------------------</span><span>
</span><span id="line-53"></span><span class="hs-comment">--        Manipulating CgIdInfo</span><span>
</span><span id="line-54"></span><span class="hs-comment">-------------------------------------</span><span>
</span><span id="line-55"></span><span>
</span><span id="line-56"></span><span class="annot"><a href="GHC.StgToCmm.Env.html#mkCgIdInfo"><span class="hs-identifier hs-type">mkCgIdInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LambdaFormInfo"><span class="hs-identifier hs-type">LambdaFormInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#CgIdInfo"><span class="hs-identifier hs-type">CgIdInfo</span></a></span><span>
</span><span id="line-57"></span><span id="mkCgIdInfo"><span class="annot"><span class="annottext">mkCgIdInfo :: Id -&gt; LambdaFormInfo -&gt; CmmExpr -&gt; CgIdInfo
</span><a href="GHC.StgToCmm.Env.html#mkCgIdInfo"><span class="hs-identifier hs-var hs-var">mkCgIdInfo</span></a></span></span><span> </span><span id="local-6989586621681052842"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681052842"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span id="local-6989586621681052841"><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681052841"><span class="hs-identifier hs-var">lf</span></a></span></span><span> </span><span id="local-6989586621681052840"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681052840"><span class="hs-identifier hs-var">expr</span></a></span></span><span>
</span><span id="line-58"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CgIdInfo :: Id -&gt; LambdaFormInfo -&gt; CgLoc -&gt; CgIdInfo
</span><a href="GHC.StgToCmm.Monad.html#CgIdInfo"><span class="hs-identifier hs-type">CgIdInfo</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">cg_id :: Id
</span><a href="GHC.StgToCmm.Monad.html#cg_id"><span class="hs-identifier hs-var">cg_id</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681052842"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cg_lf :: LambdaFormInfo
</span><a href="GHC.StgToCmm.Monad.html#cg_lf"><span class="hs-identifier hs-var">cg_lf</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681052841"><span class="hs-identifier hs-var">lf</span></a></span><span>
</span><span id="line-59"></span><span>             </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cg_loc :: CgLoc
</span><a href="GHC.StgToCmm.Monad.html#cg_loc"><span class="hs-identifier hs-var">cg_loc</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; CgLoc
</span><a href="GHC.StgToCmm.Closure.html#CmmLoc"><span class="hs-identifier hs-var">CmmLoc</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681052840"><span class="hs-identifier hs-var">expr</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-60"></span><span>
</span><span id="line-61"></span><span class="annot"><a href="GHC.StgToCmm.Env.html#litIdInfo"><span class="hs-identifier hs-type">litIdInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LambdaFormInfo"><span class="hs-identifier hs-type">LambdaFormInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-type">CmmLit</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#CgIdInfo"><span class="hs-identifier hs-type">CgIdInfo</span></a></span><span>
</span><span id="line-62"></span><span id="litIdInfo"><span class="annot"><span class="annottext">litIdInfo :: DynFlags -&gt; Id -&gt; LambdaFormInfo -&gt; CmmLit -&gt; CgIdInfo
</span><a href="GHC.StgToCmm.Env.html#litIdInfo"><span class="hs-identifier hs-var hs-var">litIdInfo</span></a></span></span><span> </span><span id="local-6989586621681052834"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681052834"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681052833"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681052833"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span id="local-6989586621681052832"><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681052832"><span class="hs-identifier hs-var">lf</span></a></span></span><span> </span><span id="local-6989586621681052831"><span class="annot"><span class="annottext">CmmLit
</span><a href="#local-6989586621681052831"><span class="hs-identifier hs-var">lit</span></a></span></span><span>
</span><span id="line-63"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CgIdInfo :: Id -&gt; LambdaFormInfo -&gt; CgLoc -&gt; CgIdInfo
</span><a href="GHC.StgToCmm.Monad.html#CgIdInfo"><span class="hs-identifier hs-type">CgIdInfo</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">cg_id :: Id
</span><a href="GHC.StgToCmm.Monad.html#cg_id"><span class="hs-identifier hs-var">cg_id</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681052833"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cg_lf :: LambdaFormInfo
</span><a href="GHC.StgToCmm.Monad.html#cg_lf"><span class="hs-identifier hs-var">cg_lf</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681052832"><span class="hs-identifier hs-var">lf</span></a></span><span>
</span><span id="line-64"></span><span>             </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cg_loc :: CgLoc
</span><a href="GHC.StgToCmm.Monad.html#cg_loc"><span class="hs-identifier hs-var">cg_loc</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; CgLoc
</span><a href="GHC.StgToCmm.Closure.html#CmmLoc"><span class="hs-identifier hs-var">CmmLoc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; CmmExpr -&gt; DynTag -&gt; CmmExpr
</span><a href="GHC.StgToCmm.Env.html#addDynTag"><span class="hs-identifier hs-var">addDynTag</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681052829"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit
</span><a href="#local-6989586621681052831"><span class="hs-identifier hs-var">lit</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">DynTag
</span><a href="#local-6989586621681052827"><span class="hs-identifier hs-var">tag</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-65"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-66"></span><span>    </span><span id="local-6989586621681052827"><span class="annot"><span class="annottext">tag :: DynTag
</span><a href="#local-6989586621681052827"><span class="hs-identifier hs-var hs-var">tag</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; LambdaFormInfo -&gt; DynTag
</span><a href="GHC.StgToCmm.Closure.html#lfDynTag"><span class="hs-identifier hs-var">lfDynTag</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681052834"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681052832"><span class="hs-identifier hs-var">lf</span></a></span><span>
</span><span id="line-67"></span><span>    </span><span id="local-6989586621681052829"><span class="annot"><span class="annottext">platform :: Platform
</span><a href="#local-6989586621681052829"><span class="hs-identifier hs-var hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Platform
</span><a href="GHC.Driver.Session.html#targetPlatform"><span class="hs-identifier hs-var hs-var">targetPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681052834"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-68"></span><span>
</span><span id="line-69"></span><span class="annot"><a href="GHC.StgToCmm.Env.html#lneIdInfo"><span class="hs-identifier hs-type">lneIdInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.StgToCmm.Closure.html#NonVoid"><span class="hs-identifier hs-type">NonVoid</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#CgIdInfo"><span class="hs-identifier hs-type">CgIdInfo</span></a></span><span>
</span><span id="line-70"></span><span id="lneIdInfo"><span class="annot"><span class="annottext">lneIdInfo :: Platform -&gt; Id -&gt; [NonVoid Id] -&gt; CgIdInfo
</span><a href="GHC.StgToCmm.Env.html#lneIdInfo"><span class="hs-identifier hs-var hs-var">lneIdInfo</span></a></span></span><span> </span><span id="local-6989586621681052824"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681052824"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621681052823"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681052823"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span id="local-6989586621681052822"><span class="annot"><span class="annottext">[NonVoid Id]
</span><a href="#local-6989586621681052822"><span class="hs-identifier hs-var">regs</span></a></span></span><span>
</span><span id="line-71"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CgIdInfo :: Id -&gt; LambdaFormInfo -&gt; CgLoc -&gt; CgIdInfo
</span><a href="GHC.StgToCmm.Monad.html#CgIdInfo"><span class="hs-identifier hs-type">CgIdInfo</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">cg_id :: Id
</span><a href="GHC.StgToCmm.Monad.html#cg_id"><span class="hs-identifier hs-var">cg_id</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681052823"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cg_lf :: LambdaFormInfo
</span><a href="GHC.StgToCmm.Monad.html#cg_lf"><span class="hs-identifier hs-var">cg_lf</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681052821"><span class="hs-identifier hs-var">lf</span></a></span><span>
</span><span id="line-72"></span><span>             </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cg_loc :: CgLoc
</span><a href="GHC.StgToCmm.Monad.html#cg_loc"><span class="hs-identifier hs-var">cg_loc</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BlockId -&gt; [LocalReg] -&gt; CgLoc
</span><a href="GHC.StgToCmm.Closure.html#LneLoc"><span class="hs-identifier hs-var">LneLoc</span></a></span><span> </span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681052819"><span class="hs-identifier hs-var">blk_id</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(NonVoid Id -&gt; LocalReg) -&gt; [NonVoid Id] -&gt; [LocalReg]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; NonVoid Id -&gt; LocalReg
</span><a href="GHC.StgToCmm.Env.html#idToReg"><span class="hs-identifier hs-var">idToReg</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681052824"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[NonVoid Id]
</span><a href="#local-6989586621681052822"><span class="hs-identifier hs-var">regs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-73"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-74"></span><span>    </span><span id="local-6989586621681052821"><span class="annot"><span class="annottext">lf :: LambdaFormInfo
</span><a href="#local-6989586621681052821"><span class="hs-identifier hs-var hs-var">lf</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="GHC.StgToCmm.Closure.html#mkLFLetNoEscape"><span class="hs-identifier hs-var">mkLFLetNoEscape</span></a></span><span>
</span><span id="line-75"></span><span>    </span><span id="local-6989586621681052819"><span class="annot"><span class="annottext">blk_id :: BlockId
</span><a href="#local-6989586621681052819"><span class="hs-identifier hs-var hs-var">blk_id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; BlockId
</span><a href="GHC.Cmm.BlockId.html#mkBlockId"><span class="hs-identifier hs-var">mkBlockId</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Unique
</span><a href="GHC.Types.Id.html#idUnique"><span class="hs-identifier hs-var">idUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681052823"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-76"></span><span>
</span><span id="line-77"></span><span>
</span><span id="line-78"></span><span class="annot"><a href="GHC.StgToCmm.Env.html#rhsIdInfo"><span class="hs-identifier hs-type">rhsIdInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LambdaFormInfo"><span class="hs-identifier hs-type">LambdaFormInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Monad.html#CgIdInfo"><span class="hs-identifier hs-type">CgIdInfo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#LocalReg"><span class="hs-identifier hs-type">LocalReg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-79"></span><span id="rhsIdInfo"><span class="annot"><span class="annottext">rhsIdInfo :: Id -&gt; LambdaFormInfo -&gt; FCode (CgIdInfo, LocalReg)
</span><a href="GHC.StgToCmm.Env.html#rhsIdInfo"><span class="hs-identifier hs-var hs-var">rhsIdInfo</span></a></span></span><span> </span><span id="local-6989586621681052815"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681052815"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span id="local-6989586621681052814"><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681052814"><span class="hs-identifier hs-var">lf_info</span></a></span></span><span>
</span><span id="line-80"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621681052813"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681052813"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FCode Platform
</span><a href="GHC.StgToCmm.Monad.html#getPlatform"><span class="hs-identifier hs-var">getPlatform</span></a></span><span>
</span><span id="line-81"></span><span>       </span><span id="local-6989586621681052811"><span class="annot"><span class="annottext">LocalReg
</span><a href="#local-6989586621681052811"><span class="hs-identifier hs-var">reg</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">CmmType -&gt; FCode LocalReg
forall (m :: * -&gt; *). MonadUnique m =&gt; CmmType -&gt; m LocalReg
</span><a href="GHC.StgToCmm.Utils.html#newTemp"><span class="hs-identifier hs-var">newTemp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; CmmType
</span><a href="GHC.Cmm.Type.html#gcWord"><span class="hs-identifier hs-var">gcWord</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681052813"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-82"></span><span>       </span><span class="annot"><span class="annottext">(CgIdInfo, LocalReg) -&gt; FCode (CgIdInfo, LocalReg)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; LambdaFormInfo -&gt; CmmExpr -&gt; CgIdInfo
</span><a href="GHC.StgToCmm.Env.html#mkCgIdInfo"><span class="hs-identifier hs-var">mkCgIdInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681052815"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681052814"><span class="hs-identifier hs-var">lf_info</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmReg -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmReg"><span class="hs-identifier hs-var">CmmReg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalReg -&gt; CmmReg
</span><a href="GHC.Cmm.Expr.html#CmmLocal"><span class="hs-identifier hs-var">CmmLocal</span></a></span><span> </span><span class="annot"><span class="annottext">LocalReg
</span><a href="#local-6989586621681052811"><span class="hs-identifier hs-var">reg</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">LocalReg
</span><a href="#local-6989586621681052811"><span class="hs-identifier hs-var">reg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-83"></span><span>
</span><span id="line-84"></span><span class="annot"><a href="GHC.StgToCmm.Env.html#mkRhsInit"><span class="hs-identifier hs-type">mkRhsInit</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#LocalReg"><span class="hs-identifier hs-type">LocalReg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LambdaFormInfo"><span class="hs-identifier hs-type">LambdaFormInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Graph.html#CmmAGraph"><span class="hs-identifier hs-type">CmmAGraph</span></a></span><span>
</span><span id="line-85"></span><span id="mkRhsInit"><span class="annot"><span class="annottext">mkRhsInit :: DynFlags -&gt; LocalReg -&gt; LambdaFormInfo -&gt; CmmExpr -&gt; CmmAGraph
</span><a href="GHC.StgToCmm.Env.html#mkRhsInit"><span class="hs-identifier hs-var hs-var">mkRhsInit</span></a></span></span><span> </span><span id="local-6989586621681052806"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681052806"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681052805"><span class="annot"><span class="annottext">LocalReg
</span><a href="#local-6989586621681052805"><span class="hs-identifier hs-var">reg</span></a></span></span><span> </span><span id="local-6989586621681052804"><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681052804"><span class="hs-identifier hs-var">lf_info</span></a></span></span><span> </span><span id="local-6989586621681052803"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681052803"><span class="hs-identifier hs-var">expr</span></a></span></span><span>
</span><span id="line-86"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmReg -&gt; CmmExpr -&gt; CmmAGraph
</span><a href="GHC.Cmm.Graph.html#mkAssign"><span class="hs-identifier hs-var">mkAssign</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalReg -&gt; CmmReg
</span><a href="GHC.Cmm.Expr.html#CmmLocal"><span class="hs-identifier hs-var">CmmLocal</span></a></span><span> </span><span class="annot"><span class="annottext">LocalReg
</span><a href="#local-6989586621681052805"><span class="hs-identifier hs-var">reg</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; CmmExpr -&gt; DynTag -&gt; CmmExpr
</span><a href="GHC.StgToCmm.Env.html#addDynTag"><span class="hs-identifier hs-var">addDynTag</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681052801"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681052803"><span class="hs-identifier hs-var">expr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; LambdaFormInfo -&gt; DynTag
</span><a href="GHC.StgToCmm.Closure.html#lfDynTag"><span class="hs-identifier hs-var">lfDynTag</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681052806"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681052804"><span class="hs-identifier hs-var">lf_info</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-87"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621681052801"><span class="annot"><span class="annottext">platform :: Platform
</span><a href="#local-6989586621681052801"><span class="hs-identifier hs-var hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Platform
</span><a href="GHC.Driver.Session.html#targetPlatform"><span class="hs-identifier hs-var hs-var">targetPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681052806"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-88"></span><span>
</span><span id="line-89"></span><span class="annot"><a href="GHC.StgToCmm.Env.html#idInfoToAmode"><span class="hs-identifier hs-type">idInfoToAmode</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#CgIdInfo"><span class="hs-identifier hs-type">CgIdInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span>
</span><span id="line-90"></span><span class="hs-comment">-- Returns a CmmExpr for the *tagged* pointer</span><span>
</span><span id="line-91"></span><span id="idInfoToAmode"><span class="annot"><span class="annottext">idInfoToAmode :: CgIdInfo -&gt; CmmExpr
</span><a href="GHC.StgToCmm.Env.html#idInfoToAmode"><span class="hs-identifier hs-var hs-var">idInfoToAmode</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Monad.html#CgIdInfo"><span class="hs-identifier hs-type">CgIdInfo</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">cg_loc :: CgIdInfo -&gt; CgLoc
</span><a href="GHC.StgToCmm.Monad.html#cg_loc"><span class="hs-identifier hs-var">cg_loc</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#CmmLoc"><span class="hs-identifier hs-type">CmmLoc</span></a></span><span> </span><span id="local-6989586621681052800"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681052800"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681052800"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-92"></span><span class="annot"><a href="GHC.StgToCmm.Env.html#idInfoToAmode"><span class="hs-identifier hs-var">idInfoToAmode</span></a></span><span> </span><span id="local-6989586621681052799"><span class="annot"><span class="annottext">CgIdInfo
</span><a href="#local-6989586621681052799"><span class="hs-identifier hs-var">cg_info</span></a></span></span><span>
</span><span id="line-93"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc -&gt; CmmExpr
forall a. HasCallStack =&gt; String -&gt; SDoc -&gt; a
</span><a href="GHC.Utils.Outputable.html#pprPanic"><span class="hs-identifier hs-var">pprPanic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;idInfoToAmode&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CgIdInfo -&gt; Id
</span><a href="GHC.StgToCmm.Monad.html#cg_id"><span class="hs-identifier hs-var hs-var">cg_id</span></a></span><span> </span><span class="annot"><span class="annottext">CgIdInfo
</span><a href="#local-6989586621681052799"><span class="hs-identifier hs-var">cg_info</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>        </span><span class="hs-comment">-- LneLoc</span><span>
</span><span id="line-94"></span><span>
</span><span id="line-95"></span><span class="hs-comment">-- | A tag adds a byte offset to the pointer</span><span>
</span><span id="line-96"></span><span class="annot"><a href="GHC.StgToCmm.Env.html#addDynTag"><span class="hs-identifier hs-type">addDynTag</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#DynTag"><span class="hs-identifier hs-type">DynTag</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span>
</span><span id="line-97"></span><span id="addDynTag"><span class="annot"><span class="annottext">addDynTag :: Platform -&gt; CmmExpr -&gt; DynTag -&gt; CmmExpr
</span><a href="GHC.StgToCmm.Env.html#addDynTag"><span class="hs-identifier hs-var hs-var">addDynTag</span></a></span></span><span> </span><span id="local-6989586621681052796"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681052796"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621681052795"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681052795"><span class="hs-identifier hs-var">expr</span></a></span></span><span> </span><span id="local-6989586621681052794"><span class="annot"><span class="annottext">DynTag
</span><a href="#local-6989586621681052794"><span class="hs-identifier hs-var">tag</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; CmmExpr -&gt; DynTag -&gt; CmmExpr
</span><a href="GHC.Cmm.Utils.html#cmmOffsetB"><span class="hs-identifier hs-var">cmmOffsetB</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681052796"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681052795"><span class="hs-identifier hs-var">expr</span></a></span><span> </span><span class="annot"><span class="annottext">DynTag
</span><a href="#local-6989586621681052794"><span class="hs-identifier hs-var">tag</span></a></span><span>
</span><span id="line-98"></span><span>
</span><span id="line-99"></span><span class="annot"><a href="GHC.StgToCmm.Env.html#maybeLetNoEscape"><span class="hs-identifier hs-type">maybeLetNoEscape</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#CgIdInfo"><span class="hs-identifier hs-type">CgIdInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.BlockId.html#BlockId"><span class="hs-identifier hs-type">BlockId</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Expr.html#LocalReg"><span class="hs-identifier hs-type">LocalReg</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-100"></span><span id="maybeLetNoEscape"><span class="annot"><span class="annottext">maybeLetNoEscape :: CgIdInfo -&gt; Maybe (BlockId, [LocalReg])
</span><a href="GHC.StgToCmm.Env.html#maybeLetNoEscape"><span class="hs-identifier hs-var hs-var">maybeLetNoEscape</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Monad.html#CgIdInfo"><span class="hs-identifier hs-type">CgIdInfo</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">cg_loc :: CgIdInfo -&gt; CgLoc
</span><a href="GHC.StgToCmm.Monad.html#cg_loc"><span class="hs-identifier hs-var">cg_loc</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#LneLoc"><span class="hs-identifier hs-type">LneLoc</span></a></span><span> </span><span id="local-6989586621681052792"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681052792"><span class="hs-identifier hs-var">blk_id</span></a></span></span><span> </span><span id="local-6989586621681052791"><span class="annot"><span class="annottext">[LocalReg]
</span><a href="#local-6989586621681052791"><span class="hs-identifier hs-var">args</span></a></span></span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(BlockId, [LocalReg]) -&gt; Maybe (BlockId, [LocalReg])
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681052792"><span class="hs-identifier hs-var">blk_id</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[LocalReg]
</span><a href="#local-6989586621681052791"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-101"></span><span class="annot"><a href="GHC.StgToCmm.Env.html#maybeLetNoEscape"><span class="hs-identifier hs-var">maybeLetNoEscape</span></a></span><span> </span><span id="local-6989586621681052790"><span class="annot"><span class="annottext">CgIdInfo
</span><a href="#local-6989586621681052790"><span class="hs-identifier hs-var">_other</span></a></span></span><span>                                      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe (BlockId, [LocalReg])
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-102"></span><span>
</span><span id="line-103"></span><span>
</span><span id="line-104"></span><span>
</span><span id="line-105"></span><span class="hs-comment">---------------------------------------------------------</span><span>
</span><span id="line-106"></span><span class="hs-comment">--        The binding environment</span><span>
</span><span id="line-107"></span><span class="hs-comment">--</span><span>
</span><span id="line-108"></span><span class="hs-comment">-- There are three basic routines, for adding (addBindC),</span><span>
</span><span id="line-109"></span><span class="hs-comment">-- modifying(modifyBindC) and looking up (getCgIdInfo) bindings.</span><span>
</span><span id="line-110"></span><span class="hs-comment">---------------------------------------------------------</span><span>
</span><span id="line-111"></span><span>
</span><span id="line-112"></span><span class="annot"><a href="GHC.StgToCmm.Env.html#addBindC"><span class="hs-identifier hs-type">addBindC</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#CgIdInfo"><span class="hs-identifier hs-type">CgIdInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-113"></span><span id="addBindC"><span class="annot"><span class="annottext">addBindC :: CgIdInfo -&gt; FCode ()
</span><a href="GHC.StgToCmm.Env.html#addBindC"><span class="hs-identifier hs-var hs-var">addBindC</span></a></span></span><span> </span><span id="local-6989586621681052789"><span class="annot"><span class="annottext">CgIdInfo
</span><a href="#local-6989586621681052789"><span class="hs-identifier hs-var">stuff_to_bind</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-114"></span><span>        </span><span id="local-6989586621681052788"><span class="annot"><span class="annottext">CgBindings
</span><a href="#local-6989586621681052788"><span class="hs-identifier hs-var">binds</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FCode CgBindings
</span><a href="GHC.StgToCmm.Monad.html#getBinds"><span class="hs-identifier hs-var">getBinds</span></a></span><span>
</span><span id="line-115"></span><span>        </span><span class="annot"><span class="annottext">CgBindings -&gt; FCode ()
</span><a href="GHC.StgToCmm.Monad.html#setBinds"><span class="hs-identifier hs-var">setBinds</span></a></span><span> </span><span class="annot"><span class="annottext">(CgBindings -&gt; FCode ()) -&gt; CgBindings -&gt; FCode ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CgBindings -&gt; Id -&gt; CgIdInfo -&gt; CgBindings
forall a. VarEnv a -&gt; Id -&gt; a -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#extendVarEnv"><span class="hs-identifier hs-var">extendVarEnv</span></a></span><span> </span><span class="annot"><span class="annottext">CgBindings
</span><a href="#local-6989586621681052788"><span class="hs-identifier hs-var">binds</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CgIdInfo -&gt; Id
</span><a href="GHC.StgToCmm.Monad.html#cg_id"><span class="hs-identifier hs-var hs-var">cg_id</span></a></span><span> </span><span class="annot"><span class="annottext">CgIdInfo
</span><a href="#local-6989586621681052789"><span class="hs-identifier hs-var">stuff_to_bind</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CgIdInfo
</span><a href="#local-6989586621681052789"><span class="hs-identifier hs-var">stuff_to_bind</span></a></span><span>
</span><span id="line-116"></span><span>
</span><span id="line-117"></span><span class="annot"><a href="GHC.StgToCmm.Env.html#addBindsC"><span class="hs-identifier hs-type">addBindsC</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.StgToCmm.Monad.html#CgIdInfo"><span class="hs-identifier hs-type">CgIdInfo</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-118"></span><span id="addBindsC"><span class="annot"><span class="annottext">addBindsC :: [CgIdInfo] -&gt; FCode ()
</span><a href="GHC.StgToCmm.Env.html#addBindsC"><span class="hs-identifier hs-var hs-var">addBindsC</span></a></span></span><span> </span><span id="local-6989586621681052784"><span class="annot"><span class="annottext">[CgIdInfo]
</span><a href="#local-6989586621681052784"><span class="hs-identifier hs-var">new_bindings</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-119"></span><span>        </span><span id="local-6989586621681052783"><span class="annot"><span class="annottext">CgBindings
</span><a href="#local-6989586621681052783"><span class="hs-identifier hs-var">binds</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FCode CgBindings
</span><a href="GHC.StgToCmm.Monad.html#getBinds"><span class="hs-identifier hs-var">getBinds</span></a></span><span>
</span><span id="line-120"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681052780"><span class="annot"><span class="annottext">new_binds :: CgBindings
</span><a href="#local-6989586621681052780"><span class="hs-identifier hs-var hs-var">new_binds</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CgBindings -&gt; CgIdInfo -&gt; CgBindings)
-&gt; CgBindings -&gt; [CgIdInfo] -&gt; CgBindings
forall (t :: * -&gt; *) b a.
Foldable t =&gt;
(b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldl%27"><span class="hs-identifier hs-var">foldl'</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621681052778"><span class="annot"><span class="annottext">CgBindings
</span><a href="#local-6989586621681052778"><span class="hs-identifier hs-var">binds</span></a></span></span><span> </span><span id="local-6989586621681052777"><span class="annot"><span class="annottext">CgIdInfo
</span><a href="#local-6989586621681052777"><span class="hs-identifier hs-var">info</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CgBindings -&gt; Id -&gt; CgIdInfo -&gt; CgBindings
forall a. VarEnv a -&gt; Id -&gt; a -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#extendVarEnv"><span class="hs-identifier hs-var">extendVarEnv</span></a></span><span> </span><span class="annot"><span class="annottext">CgBindings
</span><a href="#local-6989586621681052778"><span class="hs-identifier hs-var">binds</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CgIdInfo -&gt; Id
</span><a href="GHC.StgToCmm.Monad.html#cg_id"><span class="hs-identifier hs-var hs-var">cg_id</span></a></span><span> </span><span class="annot"><span class="annottext">CgIdInfo
</span><a href="#local-6989586621681052777"><span class="hs-identifier hs-var">info</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CgIdInfo
</span><a href="#local-6989586621681052777"><span class="hs-identifier hs-var">info</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-121"></span><span>                               </span><span class="annot"><span class="annottext">CgBindings
</span><a href="#local-6989586621681052783"><span class="hs-identifier hs-var">binds</span></a></span><span>
</span><span id="line-122"></span><span>                               </span><span class="annot"><span class="annottext">[CgIdInfo]
</span><a href="#local-6989586621681052784"><span class="hs-identifier hs-var">new_bindings</span></a></span><span>
</span><span id="line-123"></span><span>        </span><span class="annot"><span class="annottext">CgBindings -&gt; FCode ()
</span><a href="GHC.StgToCmm.Monad.html#setBinds"><span class="hs-identifier hs-var">setBinds</span></a></span><span> </span><span class="annot"><span class="annottext">CgBindings
</span><a href="#local-6989586621681052780"><span class="hs-identifier hs-var">new_binds</span></a></span><span>
</span><span id="line-124"></span><span>
</span><span id="line-125"></span><span class="annot"><a href="GHC.StgToCmm.Env.html#getCgIdInfo"><span class="hs-identifier hs-type">getCgIdInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#CgIdInfo"><span class="hs-identifier hs-type">CgIdInfo</span></a></span><span>
</span><span id="line-126"></span><span id="getCgIdInfo"><span class="annot"><span class="annottext">getCgIdInfo :: Id -&gt; FCode CgIdInfo
</span><a href="GHC.StgToCmm.Env.html#getCgIdInfo"><span class="hs-identifier hs-var hs-var">getCgIdInfo</span></a></span></span><span> </span><span id="local-6989586621681052776"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681052776"><span class="hs-identifier hs-var">id</span></a></span></span><span>
</span><span id="line-127"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>  </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681052775"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681052775"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FCode DynFlags
forall (m :: * -&gt; *). HasDynFlags m =&gt; m DynFlags
</span><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier hs-var">getDynFlags</span></a></span><span>
</span><span id="line-128"></span><span>        </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681052773"><span class="annot"><span class="annottext">CgBindings
</span><a href="#local-6989586621681052773"><span class="hs-identifier hs-var">local_binds</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FCode CgBindings
</span><a href="GHC.StgToCmm.Monad.html#getBinds"><span class="hs-identifier hs-var">getBinds</span></a></span><span> </span><span class="hs-comment">-- Try local bindings first</span><span>
</span><span id="line-129"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">CgBindings -&gt; Id -&gt; Maybe CgIdInfo
forall a. VarEnv a -&gt; Id -&gt; Maybe a
</span><a href="GHC.Types.Var.Env.html#lookupVarEnv"><span class="hs-identifier hs-var">lookupVarEnv</span></a></span><span> </span><span class="annot"><span class="annottext">CgBindings
</span><a href="#local-6989586621681052773"><span class="hs-identifier hs-var">local_binds</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681052776"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-130"></span><span>            </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681052771"><span class="annot"><span class="annottext">CgIdInfo
</span><a href="#local-6989586621681052771"><span class="hs-identifier hs-var">info</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CgIdInfo -&gt; FCode CgIdInfo
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">CgIdInfo
</span><a href="#local-6989586621681052771"><span class="hs-identifier hs-var">info</span></a></span><span> </span><span class="hs-special">;</span><span>
</span><span id="line-131"></span><span>            </span><span class="annot"><span class="annottext">Maybe CgIdInfo
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-132"></span><span>
</span><span id="line-133"></span><span>                </span><span class="hs-comment">-- Should be imported; make up a CgIdInfo for it</span><span>
</span><span id="line-134"></span><span>          </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681052770"><span class="annot"><span class="annottext">name :: Name
</span><a href="#local-6989586621681052770"><span class="hs-identifier hs-var hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Name
</span><a href="GHC.Types.Id.html#idName"><span class="hs-identifier hs-var">idName</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681052776"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-135"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Bool
</span><a href="GHC.Types.Name.html#isExternalName"><span class="hs-identifier hs-var">isExternalName</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681052770"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="hs-keyword">then</span><span>
</span><span id="line-136"></span><span>              </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681052765"><span class="annot"><span class="annottext">ext_lbl :: CLabel
</span><a href="#local-6989586621681052765"><span class="hs-identifier hs-var hs-var">ext_lbl</span></a></span></span><span>
</span><span id="line-137"></span><span>                      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Type -&gt; Bool
Type -&gt; Bool
</span><a href="GHC.Core.Type.html#isUnliftedType"><span class="hs-identifier hs-var">isUnliftedType</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Type
</span><a href="GHC.Types.Id.html#idType"><span class="hs-identifier hs-var">idType</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681052776"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-138"></span><span>                          </span><span class="hs-comment">-- An unlifted external Id must refer to a top-level</span><span>
</span><span id="line-139"></span><span>                          </span><span class="hs-comment">-- string literal. See Note [Bytes label] in &quot;GHC.Cmm.CLabel&quot;.</span><span>
</span><span id="line-140"></span><span>                          </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">idType</span><span> </span><span class="hs-identifier">id</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">eqType</span><span class="hs-special">`</span><span> </span><span class="hs-identifier">addrPrimTy</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-141"></span><span>                          </span><span class="annot"><span class="annottext">Name -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#mkBytesLabel"><span class="hs-identifier hs-var">mkBytesLabel</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681052770"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-142"></span><span>                      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; CafInfo -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#mkClosureLabel"><span class="hs-identifier hs-var">mkClosureLabel</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681052770"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">(CafInfo -&gt; CLabel) -&gt; CafInfo -&gt; CLabel
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; CafInfo
</span><a href="GHC.Types.Id.html#idCafInfo"><span class="hs-identifier hs-var">idCafInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681052776"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-143"></span><span>              </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">CgIdInfo -&gt; FCode CgIdInfo
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(CgIdInfo -&gt; FCode CgIdInfo) -&gt; CgIdInfo -&gt; FCode CgIdInfo
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-144"></span><span>                  </span><span class="annot"><span class="annottext">DynFlags -&gt; Id -&gt; LambdaFormInfo -&gt; CmmLit -&gt; CgIdInfo
</span><a href="GHC.StgToCmm.Env.html#litIdInfo"><span class="hs-identifier hs-var">litIdInfo</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681052775"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681052776"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; LambdaFormInfo
</span><a href="GHC.StgToCmm.Closure.html#mkLFImported"><span class="hs-identifier hs-var">mkLFImported</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681052776"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CLabel -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmLabel"><span class="hs-identifier hs-var">CmmLabel</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681052765"><span class="hs-identifier hs-var">ext_lbl</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-145"></span><span>          </span><span class="hs-keyword">else</span><span>
</span><span id="line-146"></span><span>              </span><span class="annot"><span class="annottext">Id -&gt; FCode CgIdInfo
forall a. Id -&gt; FCode a
</span><a href="GHC.StgToCmm.Env.html#cgLookupPanic"><span class="hs-identifier hs-var">cgLookupPanic</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681052776"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-comment">-- Bug</span><span>
</span><span id="line-147"></span><span>        </span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">}</span><span>
</span><span id="line-148"></span><span>
</span><span id="line-149"></span><span id="local-6989586621681052907"><span class="annot"><a href="GHC.StgToCmm.Env.html#cgLookupPanic"><span class="hs-identifier hs-type">cgLookupPanic</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681052907"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-150"></span><span id="cgLookupPanic"><span class="annot"><span class="annottext">cgLookupPanic :: forall a. Id -&gt; FCode a
</span><a href="GHC.StgToCmm.Env.html#cgLookupPanic"><span class="hs-identifier hs-var hs-var">cgLookupPanic</span></a></span></span><span> </span><span id="local-6989586621681052745"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681052745"><span class="hs-identifier hs-var">id</span></a></span></span><span>
</span><span id="line-151"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>  </span><span id="local-6989586621681052744"><span class="annot"><span class="annottext">CgBindings
</span><a href="#local-6989586621681052744"><span class="hs-identifier hs-var">local_binds</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FCode CgBindings
</span><a href="GHC.StgToCmm.Monad.html#getBinds"><span class="hs-identifier hs-var">getBinds</span></a></span><span>
</span><span id="line-152"></span><span>        </span><span class="annot"><span class="annottext">String -&gt; SDoc -&gt; FCode a
forall a. HasCallStack =&gt; String -&gt; SDoc -&gt; a
</span><a href="GHC.Utils.Outputable.html#pprPanic"><span class="hs-identifier hs-var">pprPanic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;GHC.StgToCmm.Env: variable not found&quot;</span></span><span>
</span><span id="line-153"></span><span>                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Id -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681052745"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-154"></span><span>                </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;local binds for:&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-155"></span><span>                </span><span class="annot"><span class="annottext">CgBindings -&gt; ([CgIdInfo] -&gt; SDoc) -&gt; SDoc
forall key a. UniqFM key a -&gt; ([a] -&gt; SDoc) -&gt; SDoc
</span><a href="GHC.Types.Unique.FM.html#pprUFM"><span class="hs-identifier hs-var">pprUFM</span></a></span><span> </span><span class="annot"><span class="annottext">CgBindings
</span><a href="#local-6989586621681052744"><span class="hs-identifier hs-var">local_binds</span></a></span><span> </span><span class="annot"><span class="annottext">(([CgIdInfo] -&gt; SDoc) -&gt; SDoc) -&gt; ([CgIdInfo] -&gt; SDoc) -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621681052740"><span class="annot"><span class="annottext">[CgIdInfo]
</span><a href="#local-6989586621681052740"><span class="hs-identifier hs-var">infos</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-156"></span><span>                  </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Id -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CgIdInfo -&gt; Id
</span><a href="GHC.StgToCmm.Monad.html#cg_id"><span class="hs-identifier hs-var hs-var">cg_id</span></a></span><span> </span><span class="annot"><span class="annottext">CgIdInfo
</span><a href="#local-6989586621681052739"><span class="hs-identifier hs-var">info</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621681052739"><span class="annot"><span class="annottext">CgIdInfo
</span><a href="#local-6989586621681052739"><span class="hs-identifier hs-var">info</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[CgIdInfo]
</span><a href="#local-6989586621681052740"><span class="hs-identifier hs-var">infos</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-157"></span><span>              </span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-158"></span><span>
</span><span id="line-159"></span><span>
</span><span id="line-160"></span><span class="hs-comment">--------------------</span><span>
</span><span id="line-161"></span><span class="annot"><a href="GHC.StgToCmm.Env.html#getArgAmode"><span class="hs-identifier hs-type">getArgAmode</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#NonVoid"><span class="hs-identifier hs-type">NonVoid</span></a></span><span> </span><span class="annot"><a href="GHC.Stg.Syntax.html#StgArg"><span class="hs-identifier hs-type">StgArg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span>
</span><span id="line-162"></span><span id="getArgAmode"><span class="annot"><span class="annottext">getArgAmode :: NonVoid StgArg -&gt; FCode CmmExpr
</span><a href="GHC.StgToCmm.Env.html#getArgAmode"><span class="hs-identifier hs-var hs-var">getArgAmode</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Closure.html#NonVoid"><span class="hs-identifier hs-type">NonVoid</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Stg.Syntax.html#StgVarArg"><span class="hs-identifier hs-type">StgVarArg</span></a></span><span> </span><span id="local-6989586621681052736"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681052736"><span class="hs-identifier hs-var">var</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CgIdInfo -&gt; CmmExpr
</span><a href="GHC.StgToCmm.Env.html#idInfoToAmode"><span class="hs-identifier hs-var">idInfoToAmode</span></a></span><span> </span><span class="annot"><span class="annottext">(CgIdInfo -&gt; CmmExpr) -&gt; FCode CgIdInfo -&gt; FCode CmmExpr
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; FCode CgIdInfo
</span><a href="GHC.StgToCmm.Env.html#getCgIdInfo"><span class="hs-identifier hs-var">getCgIdInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681052736"><span class="hs-identifier hs-var">var</span></a></span><span>
</span><span id="line-163"></span><span class="annot"><a href="GHC.StgToCmm.Env.html#getArgAmode"><span class="hs-identifier hs-var">getArgAmode</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Closure.html#NonVoid"><span class="hs-identifier hs-type">NonVoid</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Stg.Syntax.html#StgLitArg"><span class="hs-identifier hs-type">StgLitArg</span></a></span><span> </span><span id="local-6989586621681052733"><span class="annot"><span class="annottext">Literal
</span><a href="#local-6989586621681052733"><span class="hs-identifier hs-var">lit</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmLit -&gt; CmmExpr) -&gt; FCode CmmLit -&gt; FCode CmmExpr
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Literal -&gt; FCode CmmLit
</span><a href="GHC.StgToCmm.Utils.html#cgLit"><span class="hs-identifier hs-var">cgLit</span></a></span><span> </span><span class="annot"><span class="annottext">Literal
</span><a href="#local-6989586621681052733"><span class="hs-identifier hs-var">lit</span></a></span><span>
</span><span id="line-164"></span><span>
</span><span id="line-165"></span><span class="annot"><a href="GHC.StgToCmm.Env.html#getNonVoidArgAmodes"><span class="hs-identifier hs-type">getNonVoidArgAmodes</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Stg.Syntax.html#StgArg"><span class="hs-identifier hs-type">StgArg</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-166"></span><span class="hs-comment">-- NB: Filters out void args,</span><span>
</span><span id="line-167"></span><span class="hs-comment">--     so the result list may be shorter than the argument list</span><span>
</span><span id="line-168"></span><span id="getNonVoidArgAmodes"><span class="annot"><span class="annottext">getNonVoidArgAmodes :: [StgArg] -&gt; FCode [CmmExpr]
</span><a href="GHC.StgToCmm.Env.html#getNonVoidArgAmodes"><span class="hs-identifier hs-var hs-var">getNonVoidArgAmodes</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[CmmExpr] -&gt; FCode [CmmExpr]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-169"></span><span class="annot"><a href="GHC.StgToCmm.Env.html#getNonVoidArgAmodes"><span class="hs-identifier hs-var">getNonVoidArgAmodes</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681052731"><span class="annot"><span class="annottext">StgArg
</span><a href="#local-6989586621681052731"><span class="hs-identifier hs-var">arg</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621681052730"><span class="annot"><span class="annottext">[StgArg]
</span><a href="#local-6989586621681052730"><span class="hs-identifier hs-var">args</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-170"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">PrimRep -&gt; Bool
</span><a href="GHC.Core.TyCon.html#isVoidRep"><span class="hs-identifier hs-var">isVoidRep</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">StgArg -&gt; PrimRep
</span><a href="GHC.StgToCmm.Closure.html#argPrimRep"><span class="hs-identifier hs-var">argPrimRep</span></a></span><span> </span><span class="annot"><span class="annottext">StgArg
</span><a href="#local-6989586621681052731"><span class="hs-identifier hs-var">arg</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[StgArg] -&gt; FCode [CmmExpr]
</span><a href="GHC.StgToCmm.Env.html#getNonVoidArgAmodes"><span class="hs-identifier hs-var">getNonVoidArgAmodes</span></a></span><span> </span><span class="annot"><span class="annottext">[StgArg]
</span><a href="#local-6989586621681052730"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-171"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681052727"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681052727"><span class="hs-identifier hs-var">amode</span></a></span></span><span>  </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">NonVoid StgArg -&gt; FCode CmmExpr
</span><a href="GHC.StgToCmm.Env.html#getArgAmode"><span class="hs-identifier hs-var">getArgAmode</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">StgArg -&gt; NonVoid StgArg
forall a. a -&gt; NonVoid a
</span><a href="GHC.StgToCmm.Closure.html#NonVoid"><span class="hs-identifier hs-var">NonVoid</span></a></span><span> </span><span class="annot"><span class="annottext">StgArg
</span><a href="#local-6989586621681052731"><span class="hs-identifier hs-var">arg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-172"></span><span>                   </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681052726"><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621681052726"><span class="hs-identifier hs-var">amodes</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[StgArg] -&gt; FCode [CmmExpr]
</span><a href="GHC.StgToCmm.Env.html#getNonVoidArgAmodes"><span class="hs-identifier hs-var">getNonVoidArgAmodes</span></a></span><span> </span><span class="annot"><span class="annottext">[StgArg]
</span><a href="#local-6989586621681052730"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-173"></span><span>                   </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">[CmmExpr] -&gt; FCode [CmmExpr]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681052727"><span class="hs-identifier hs-var">amode</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; [CmmExpr] -&gt; [CmmExpr]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621681052726"><span class="hs-identifier hs-var">amodes</span></a></span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-174"></span><span>
</span><span id="line-175"></span><span>
</span><span id="line-176"></span><span class="hs-comment">------------------------------------------------------------------------</span><span>
</span><span id="line-177"></span><span class="hs-comment">--        Interface functions for binding and re-binding names</span><span>
</span><span id="line-178"></span><span class="hs-comment">------------------------------------------------------------------------</span><span>
</span><span id="line-179"></span><span>
</span><span id="line-180"></span><span class="annot"><a href="GHC.StgToCmm.Env.html#bindToReg"><span class="hs-identifier hs-type">bindToReg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#NonVoid"><span class="hs-identifier hs-type">NonVoid</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LambdaFormInfo"><span class="hs-identifier hs-type">LambdaFormInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#LocalReg"><span class="hs-identifier hs-type">LocalReg</span></a></span><span>
</span><span id="line-181"></span><span class="hs-comment">-- Bind an Id to a fresh LocalReg</span><span>
</span><span id="line-182"></span><span id="bindToReg"><span class="annot"><span class="annottext">bindToReg :: NonVoid Id -&gt; LambdaFormInfo -&gt; FCode LocalReg
</span><a href="GHC.StgToCmm.Env.html#bindToReg"><span class="hs-identifier hs-var hs-var">bindToReg</span></a></span></span><span> </span><span id="local-6989586621681052725"><span class="annot"><span class="annottext">nvid :: NonVoid Id
</span><a href="#local-6989586621681052725"><span class="hs-identifier hs-var">nvid</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Closure.html#NonVoid"><span class="hs-identifier hs-type">NonVoid</span></a></span><span> </span><span id="local-6989586621681052724"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681052724"><span class="hs-identifier hs-var">id</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681052723"><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681052723"><span class="hs-identifier hs-var">lf_info</span></a></span></span><span>
</span><span id="line-183"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621681052722"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681052722"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FCode Platform
</span><a href="GHC.StgToCmm.Monad.html#getPlatform"><span class="hs-identifier hs-var">getPlatform</span></a></span><span>
</span><span id="line-184"></span><span>       </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681052721"><span class="annot"><span class="annottext">reg :: LocalReg
</span><a href="#local-6989586621681052721"><span class="hs-identifier hs-var hs-var">reg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; NonVoid Id -&gt; LocalReg
</span><a href="GHC.StgToCmm.Env.html#idToReg"><span class="hs-identifier hs-var">idToReg</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681052722"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">NonVoid Id
</span><a href="#local-6989586621681052725"><span class="hs-identifier hs-var">nvid</span></a></span><span>
</span><span id="line-185"></span><span>       </span><span class="annot"><span class="annottext">CgIdInfo -&gt; FCode ()
</span><a href="GHC.StgToCmm.Env.html#addBindC"><span class="hs-identifier hs-var">addBindC</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; LambdaFormInfo -&gt; CmmExpr -&gt; CgIdInfo
</span><a href="GHC.StgToCmm.Env.html#mkCgIdInfo"><span class="hs-identifier hs-var">mkCgIdInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681052724"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681052723"><span class="hs-identifier hs-var">lf_info</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmReg -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmReg"><span class="hs-identifier hs-var">CmmReg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalReg -&gt; CmmReg
</span><a href="GHC.Cmm.Expr.html#CmmLocal"><span class="hs-identifier hs-var">CmmLocal</span></a></span><span> </span><span class="annot"><span class="annottext">LocalReg
</span><a href="#local-6989586621681052721"><span class="hs-identifier hs-var">reg</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-186"></span><span>       </span><span class="annot"><span class="annottext">LocalReg -&gt; FCode LocalReg
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">LocalReg
</span><a href="#local-6989586621681052721"><span class="hs-identifier hs-var">reg</span></a></span><span>
</span><span id="line-187"></span><span>
</span><span id="line-188"></span><span class="annot"><a href="GHC.StgToCmm.Env.html#rebindToReg"><span class="hs-identifier hs-type">rebindToReg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#NonVoid"><span class="hs-identifier hs-type">NonVoid</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#LocalReg"><span class="hs-identifier hs-type">LocalReg</span></a></span><span>
</span><span id="line-189"></span><span class="hs-comment">-- Like bindToReg, but the Id is already in scope, so</span><span>
</span><span id="line-190"></span><span class="hs-comment">-- get its LF info from the envt</span><span>
</span><span id="line-191"></span><span id="rebindToReg"><span class="annot"><span class="annottext">rebindToReg :: NonVoid Id -&gt; FCode LocalReg
</span><a href="GHC.StgToCmm.Env.html#rebindToReg"><span class="hs-identifier hs-var hs-var">rebindToReg</span></a></span></span><span> </span><span id="local-6989586621681052720"><span class="annot"><span class="annottext">nvid :: NonVoid Id
</span><a href="#local-6989586621681052720"><span class="hs-identifier hs-var">nvid</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Closure.html#NonVoid"><span class="hs-identifier hs-type">NonVoid</span></a></span><span> </span><span id="local-6989586621681052719"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681052719"><span class="hs-identifier hs-var">id</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-192"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>  </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681052718"><span class="annot"><span class="annottext">CgIdInfo
</span><a href="#local-6989586621681052718"><span class="hs-identifier hs-var">info</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Id -&gt; FCode CgIdInfo
</span><a href="GHC.StgToCmm.Env.html#getCgIdInfo"><span class="hs-identifier hs-var">getCgIdInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681052719"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-193"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">NonVoid Id -&gt; LambdaFormInfo -&gt; FCode LocalReg
</span><a href="GHC.StgToCmm.Env.html#bindToReg"><span class="hs-identifier hs-var">bindToReg</span></a></span><span> </span><span class="annot"><span class="annottext">NonVoid Id
</span><a href="#local-6989586621681052720"><span class="hs-identifier hs-var">nvid</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CgIdInfo -&gt; LambdaFormInfo
</span><a href="GHC.StgToCmm.Monad.html#cg_lf"><span class="hs-identifier hs-var hs-var">cg_lf</span></a></span><span> </span><span class="annot"><span class="annottext">CgIdInfo
</span><a href="#local-6989586621681052718"><span class="hs-identifier hs-var">info</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-194"></span><span>
</span><span id="line-195"></span><span class="annot"><a href="GHC.StgToCmm.Env.html#bindArgToReg"><span class="hs-identifier hs-type">bindArgToReg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#NonVoid"><span class="hs-identifier hs-type">NonVoid</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#LocalReg"><span class="hs-identifier hs-type">LocalReg</span></a></span><span>
</span><span id="line-196"></span><span id="bindArgToReg"><span class="annot"><span class="annottext">bindArgToReg :: NonVoid Id -&gt; FCode LocalReg
</span><a href="GHC.StgToCmm.Env.html#bindArgToReg"><span class="hs-identifier hs-var hs-var">bindArgToReg</span></a></span></span><span> </span><span id="local-6989586621681052717"><span class="annot"><span class="annottext">nvid :: NonVoid Id
</span><a href="#local-6989586621681052717"><span class="hs-identifier hs-var">nvid</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Closure.html#NonVoid"><span class="hs-identifier hs-type">NonVoid</span></a></span><span> </span><span id="local-6989586621681052716"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681052716"><span class="hs-identifier hs-var">id</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NonVoid Id -&gt; LambdaFormInfo -&gt; FCode LocalReg
</span><a href="GHC.StgToCmm.Env.html#bindToReg"><span class="hs-identifier hs-var">bindToReg</span></a></span><span> </span><span class="annot"><span class="annottext">NonVoid Id
</span><a href="#local-6989586621681052717"><span class="hs-identifier hs-var">nvid</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; LambdaFormInfo
</span><a href="GHC.StgToCmm.Closure.html#mkLFArgument"><span class="hs-identifier hs-var">mkLFArgument</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681052716"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-197"></span><span>
</span><span id="line-198"></span><span class="annot"><a href="GHC.StgToCmm.Env.html#bindArgsToRegs"><span class="hs-identifier hs-type">bindArgsToRegs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.StgToCmm.Closure.html#NonVoid"><span class="hs-identifier hs-type">NonVoid</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Expr.html#LocalReg"><span class="hs-identifier hs-type">LocalReg</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-199"></span><span id="bindArgsToRegs"><span class="annot"><span class="annottext">bindArgsToRegs :: [NonVoid Id] -&gt; FCode [LocalReg]
</span><a href="GHC.StgToCmm.Env.html#bindArgsToRegs"><span class="hs-identifier hs-var hs-var">bindArgsToRegs</span></a></span></span><span> </span><span id="local-6989586621681052714"><span class="annot"><span class="annottext">[NonVoid Id]
</span><a href="#local-6989586621681052714"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(NonVoid Id -&gt; FCode LocalReg) -&gt; [NonVoid Id] -&gt; FCode [LocalReg]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="annot"><span class="annottext">NonVoid Id -&gt; FCode LocalReg
</span><a href="GHC.StgToCmm.Env.html#bindArgToReg"><span class="hs-identifier hs-var">bindArgToReg</span></a></span><span> </span><span class="annot"><span class="annottext">[NonVoid Id]
</span><a href="#local-6989586621681052714"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-200"></span><span>
</span><span id="line-201"></span><span class="annot"><a href="GHC.StgToCmm.Env.html#idToReg"><span class="hs-identifier hs-type">idToReg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#NonVoid"><span class="hs-identifier hs-type">NonVoid</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#LocalReg"><span class="hs-identifier hs-type">LocalReg</span></a></span><span>
</span><span id="line-202"></span><span class="hs-comment">-- Make a register from an Id, typically a function argument,</span><span>
</span><span id="line-203"></span><span class="hs-comment">-- free variable, or case binder</span><span>
</span><span id="line-204"></span><span class="hs-comment">--</span><span>
</span><span id="line-205"></span><span class="hs-comment">-- We re-use the Unique from the Id to make it easier to see what is going on</span><span>
</span><span id="line-206"></span><span class="hs-comment">--</span><span>
</span><span id="line-207"></span><span class="hs-comment">-- By now the Ids should be uniquely named; else one would worry</span><span>
</span><span id="line-208"></span><span class="hs-comment">-- about accidental collision</span><span>
</span><span id="line-209"></span><span id="idToReg"><span class="annot"><span class="annottext">idToReg :: Platform -&gt; NonVoid Id -&gt; LocalReg
</span><a href="GHC.StgToCmm.Env.html#idToReg"><span class="hs-identifier hs-var hs-var">idToReg</span></a></span></span><span> </span><span id="local-6989586621681052712"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681052712"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Closure.html#NonVoid"><span class="hs-identifier hs-type">NonVoid</span></a></span><span> </span><span id="local-6989586621681052711"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681052711"><span class="hs-identifier hs-var">id</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-210"></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; CmmType -&gt; LocalReg
</span><a href="GHC.Cmm.Expr.html#LocalReg"><span class="hs-identifier hs-var">LocalReg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Unique
</span><a href="GHC.Types.Id.html#idUnique"><span class="hs-identifier hs-var">idUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681052711"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-211"></span><span>                        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; PrimRep -&gt; CmmType
</span><a href="GHC.Cmm.Utils.html#primRepCmmType"><span class="hs-identifier hs-var">primRepCmmType</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681052712"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; PrimRep
</span><a href="GHC.StgToCmm.Closure.html#idPrimRep"><span class="hs-identifier hs-var">idPrimRep</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681052711"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-212"></span></pre></body></html>